package com.ebt.m.proposal_v2.dao.response;

import android.util.Log;

import com.ebt.m.proposal_v2.bean.ApplicantEntity;
import com.ebt.m.proposal_v2.bean.InsuranceEntity;
import com.ebt.m.proposal_v2.bean.InsuranceOption;
import com.ebt.m.proposal_v2.bean.InsuredEntity;
import com.ebt.m.utils.JsonUtil;

import java.util.ArrayList;
import java.util.List;

/**
 * @author archer.qi
 *         Created on 2017/6/12.
 */
public class ResponseDraft {

    /**
     * insured : [{"risk":[{"isMain":1,"sort":0,"thumbnail":"http://ebtres.oss-cn-hangzhou.aliyuncs.com/Picture/5553/tn00.png","benefit":[],"productId":5555,"productName":"御享人生重大疾病保险","searchData":{"CShortName":"御享人生","modelMap":{"value":["Q_ProductID","Q_CName","Q_CShortName","Q_BrandID","Q_ProductCategoryID","Q_InsurerProposalSysID","Q_ContractProperty","Q_HasDividents","Q_CoveragePeriod","Q_PaymentPeriod","Q_Thumbnail","Q_CompositionProperty","Q_AccMinAge","Q_AccMaxAge","Q_AccSex","Q_AccOccupation","Q_Description","Q_ListOrder","Q_RateTable","Q_PlanCode","Q_AttachPlanCode","Q_RelyPlanCode","Q_RecordTime","Q_RecordNo","Q_RecordIRC","Q_RecordCategory","Q_IsInsrPrpslSysPrdct","N_CPCalculateMode","N_CUnitValue","N_CUnit","N_CMultipleMin","N_CMultipleMax","N_CMultipleStep","N_PUnit","N_DecimalDigits","N_CoveragePeriod","N_PaymentPeriod","N_PISex","N_PIOccupationCategory","N_PIAge","N_RateTable","N_DefaultCoverage","N_GetRateMethod","N_SexSet","N_AgeSet","N_Coverage","N_Premium","N_CurrencyUnit","N_CKeyboardAllowed","N_CUpperLimitedAuto","N_CLowerLimitedAuto","N_CumulationPremium","N_PremiumPerYear","N_AreaBnftList","N_AreaBenefit7","N_AreaBenefit7","N_PolicyTermURL","N_CatloguePictureURL","N_ChapterURL","N_PolicyTermQRURL","N_EliminationPeriod","N_CoveragePeriod","_CPCalculateMode","N_Premium","N_Coverage","N_Bnftlist","N_Featurelist","V_(Model_CumulationPremium,Model_Bnft_Disease_Death,Model_Bnft_Accidental_Death)"],"key":["Model_ProductID","Model_CName","Model_CShortName","Model_BrandID","Model_ProductCategoryID","Model_InsurerProposalSysID","Model_ContractProperty","Model_HasDividents","Model_CoveragePeriod0","Model_PaymentPeriod0","Model_Thumbnail","Model_CompositionProperty","Model_AccMinAge","Model_AccMaxAge","Model_AccSex","Model_AccOccupation","Model_Description","Model_ListOrder","Model_RateTableB","Model_PlanCode","Model_AttachPlanCode","Model_RelyPlanCode","Model_RecordTime","Model_RecordNo","Model_RecordIRC","Model_RecordCategory","Model_IsInsrPrpslSysPrdct","Model_CPCalculateMode","Model_CUnitValue","Model_CUnit","Model_CMultipleMin","Model_CMultipleMax","Model_CMultipleStep","Model_PUnit","Model_DecimalDigits","Model_CoveragePeriod","Model_PaymentPeriod","Model_PISex","Model_PIOccupationCategory","Model_PIAge","Model_RateTable","Model_DefaultCoverage","Model_GetRateMethod","Model_SexSet","Model_AgeSet","Model_Coverage","Model_Premium","Model_CurrencyUnit","Model_CKeyboardAllowed","Model_CUpperLimitedAuto","Model_CLowerLimitedAuto","Model_CumulationPremium","Model_PremiumPerYear","Model_AreaBnftList","Model_Bnft_Disease_Death","Model_Bnft_Accidental_Death","Model_PolicyTermURL","Model_CatloguePictureURL","Model_ChapterURL","Model_PolicyTermQRURL","Model_EliminationPeriod","NCIModel_InsuYear","NCIModel_Payendyear","NCIModel_Premium","NCIModel_Coverage","Model_Bnftlist","Model_Featurelist","Model_TrueBnft"]},"cName":"御享人生重大疾病保险","ProductID":5555},"featureData":[{"fieldName":"CoveragePeriod","value":-105,"displayName":"保至终身"},{"fieldName":"PaymentPeriod","value":30,"displayName":"30年交"},{"fieldName":"Premium","value":"2100","displayName":""},{"fieldName":"Coverage","value":"300000","displayName":""}]}],"age":18,"profession":"1","birthday":"","relation":"5","sex":1,"name":"成对"}]
     * thumbnail : http://ebtres.oss-cn-hangzhou.aliyuncs.com/Picture/5553/tn00.png
     * totalPremium : 2100.00
     * proposalName : 御享人生重大疾病保险
     * message : []
     * applicant : {"age":19,"sex":0,"clientAccountId":"","name":"安我弟"}
     * totalCoverage : 300000.00
     * description : 重症轻症，百种保障；六次赔付，多重呵护；保费豁免，人性关爱；健康保障，生命等长
     * pickNum : 8c484a584db6aea0
     * agent : {"phone":"18669852147","name":"亲戚","portrait":"","link":"http://cas.e-baotong.cn/bsc/m/RnZ2bVRlK1U1SFErUGJ3V2laNUxLdz09"}
     */

    private String thumbnail;
    private String totalPremium;
    private String proposalName;
    private ApplicantBean applicant;
    private String totalCoverage;
    private String description;
    private String pickNum;
    private int brandId;
    private AgentBean agent;
    private List<InsuredBean> insured;
    private List<?> message;

    public int getBrandId() {
        return brandId;
    }

    public void setBrandId(int brandId) {
        this.brandId = brandId;
    }

    public String getThumbnail() {
        return thumbnail;
    }

    public void setThumbnail(String thumbnail) {
        this.thumbnail = thumbnail;
    }

    public String getTotalPremium() {
        return totalPremium;
    }

    public void setTotalPremium(String totalPremium) {
        this.totalPremium = totalPremium;
    }

    public String getProposalName() {
        return proposalName;
    }

    public void setProposalName(String proposalName) {
        this.proposalName = proposalName;
    }

    public ApplicantBean getApplicant() {
        return applicant;
    }

    public void setApplicant(ApplicantBean applicant) {
        this.applicant = applicant;
    }

    public String getTotalCoverage() {
        return totalCoverage;
    }

    public void setTotalCoverage(String totalCoverage) {
        this.totalCoverage = totalCoverage;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getPickNum() {
        return pickNum;
    }

    public void setPickNum(String pickNum) {
        this.pickNum = pickNum;
    }

    public AgentBean getAgent() {
        return agent;
    }

    public void setAgent(AgentBean agent) {
        this.agent = agent;
    }

    public List<InsuredBean> getInsured() {
        return insured;
    }

    public void setInsured(List<InsuredBean> insured) {
        this.insured = insured;
    }

    public List<?> getMessage() {
        return message;
    }

    public void setMessage(List<?> message) {
        this.message = message;
    }

    public static class ApplicantBean {
        /**
         * age : 19
         * sex : 0
         * clientAccountId :
         * name : 安我弟
         */

        private int age;
        private int sex;
        private String clientAccountId;
        private String name;
        private String birthday;
        private String phone;

        public String getPhone() {
            return phone;
        }

        public void setPhone(String phone) {
            this.phone = phone;
        }

        public String getBirthday() {
            return birthday;
        }

        public void setBirthday(String birthday) {
            this.birthday = birthday;
        }

        public int getAge() {
            return age;
        }

        public void setAge(int age) {
            this.age = age;
        }

        public int getSex() {
            return sex;
        }

        public void setSex(int sex) {
            this.sex = sex;
        }

        public String getClientAccountId() {
            return clientAccountId;
        }

        public void setClientAccountId(String clientAccountId) {
            this.clientAccountId = clientAccountId;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }

    public static class AgentBean {
        /**
         * phone : 18669852147
         * name : 亲戚
         * portrait :
         * link : http://cas.e-baotong.cn/bsc/m/RnZ2bVRlK1U1SFErUGJ3V2laNUxLdz09
         */

        private String phone;
        private String name;
        private String portrait;
        private String link;

        public String getPhone() {
            return phone;
        }

        public void setPhone(String phone) {
            this.phone = phone;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getPortrait() {
            return portrait;
        }

        public void setPortrait(String portrait) {
            this.portrait = portrait;
        }

        public String getLink() {
            return link;
        }

        public void setLink(String link) {
            this.link = link;
        }
    }

    public static class InsuredBean {
        /**
         * risk : [{"isMain":1,"sort":0,"thumbnail":"http://ebtres.oss-cn-hangzhou.aliyuncs.com/Picture/5553/tn00.png","benefit":[],"productId":5555,"productName":"御享人生重大疾病保险","searchData":{"CShortName":"御享人生","modelMap":{"value":["Q_ProductID","Q_CName","Q_CShortName","Q_BrandID","Q_ProductCategoryID","Q_InsurerProposalSysID","Q_ContractProperty","Q_HasDividents","Q_CoveragePeriod","Q_PaymentPeriod","Q_Thumbnail","Q_CompositionProperty","Q_AccMinAge","Q_AccMaxAge","Q_AccSex","Q_AccOccupation","Q_Description","Q_ListOrder","Q_RateTable","Q_PlanCode","Q_AttachPlanCode","Q_RelyPlanCode","Q_RecordTime","Q_RecordNo","Q_RecordIRC","Q_RecordCategory","Q_IsInsrPrpslSysPrdct","N_CPCalculateMode","N_CUnitValue","N_CUnit","N_CMultipleMin","N_CMultipleMax","N_CMultipleStep","N_PUnit","N_DecimalDigits","N_CoveragePeriod","N_PaymentPeriod","N_PISex","N_PIOccupationCategory","N_PIAge","N_RateTable","N_DefaultCoverage","N_GetRateMethod","N_SexSet","N_AgeSet","N_Coverage","N_Premium","N_CurrencyUnit","N_CKeyboardAllowed","N_CUpperLimitedAuto","N_CLowerLimitedAuto","N_CumulationPremium","N_PremiumPerYear","N_AreaBnftList","N_AreaBenefit7","N_AreaBenefit7","N_PolicyTermURL","N_CatloguePictureURL","N_ChapterURL","N_PolicyTermQRURL","N_EliminationPeriod","N_CoveragePeriod","_CPCalculateMode","N_Premium","N_Coverage","N_Bnftlist","N_Featurelist","V_(Model_CumulationPremium,Model_Bnft_Disease_Death,Model_Bnft_Accidental_Death)"],"key":["Model_ProductID","Model_CName","Model_CShortName","Model_BrandID","Model_ProductCategoryID","Model_InsurerProposalSysID","Model_ContractProperty","Model_HasDividents","Model_CoveragePeriod0","Model_PaymentPeriod0","Model_Thumbnail","Model_CompositionProperty","Model_AccMinAge","Model_AccMaxAge","Model_AccSex","Model_AccOccupation","Model_Description","Model_ListOrder","Model_RateTableB","Model_PlanCode","Model_AttachPlanCode","Model_RelyPlanCode","Model_RecordTime","Model_RecordNo","Model_RecordIRC","Model_RecordCategory","Model_IsInsrPrpslSysPrdct","Model_CPCalculateMode","Model_CUnitValue","Model_CUnit","Model_CMultipleMin","Model_CMultipleMax","Model_CMultipleStep","Model_PUnit","Model_DecimalDigits","Model_CoveragePeriod","Model_PaymentPeriod","Model_PISex","Model_PIOccupationCategory","Model_PIAge","Model_RateTable","Model_DefaultCoverage","Model_GetRateMethod","Model_SexSet","Model_AgeSet","Model_Coverage","Model_Premium","Model_CurrencyUnit","Model_CKeyboardAllowed","Model_CUpperLimitedAuto","Model_CLowerLimitedAuto","Model_CumulationPremium","Model_PremiumPerYear","Model_AreaBnftList","Model_Bnft_Disease_Death","Model_Bnft_Accidental_Death","Model_PolicyTermURL","Model_CatloguePictureURL","Model_ChapterURL","Model_PolicyTermQRURL","Model_EliminationPeriod","NCIModel_InsuYear","NCIModel_Payendyear","NCIModel_Premium","NCIModel_Coverage","Model_Bnftlist","Model_Featurelist","Model_TrueBnft"]},"cName":"御享人生重大疾病保险","ProductID":5555},"featureData":[{"fieldName":"CoveragePeriod","value":-105,"displayName":"保至终身"},{"fieldName":"PaymentPeriod","value":30,"displayName":"30年交"},{"fieldName":"Premium","value":"2100","displayName":""},{"fieldName":"Coverage","value":"300000","displayName":""}]}]
         * age : 18
         * profession : 1
         * birthday :
         * relation : 5
         * sex : 1
         * name : 成对
         */

        private int age;
        private String profession;
        private String birthday;
        private String relation;
        private int sex;
        private String name;
        private List<RiskBean> risk;

        public int getAge() {
            return age;
        }

        public void setAge(int age) {
            this.age = age;
        }

        public String getProfession() {
            return profession;
        }

        public void setProfession(String profession) {
            this.profession = profession;
        }

        public String getBirthday() {
            return birthday;
        }

        public void setBirthday(String birthday) {
            this.birthday = birthday;
        }

        public String getRelation() {
            return relation;
        }

        public void setRelation(String relation) {
            this.relation = relation;
        }

        public int getSex() {
            return sex;
        }

        public void setSex(int sex) {
            this.sex = sex;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public List<RiskBean> getRisk() {
            return risk;
        }

        public void setRisk(List<RiskBean> risk) {
            this.risk = risk;
        }

        public static class RiskBean {

            /**
             * isMain : 1
             * sort : 0
             * thumbnail : http://ebtres.oss-cn-hangzhou.aliyuncs.com/Picture/5553/tn00.png
             * benefit : []
             * productId : 5555
             * productName : 御享人生重大疾病保险
             * searchData : {"CShortName":"御享人生","modelMap":{"value":["Q_ProductID","Q_CName","Q_CShortName","Q_BrandID","Q_ProductCategoryID","Q_InsurerProposalSysID","Q_ContractProperty","Q_HasDividents","Q_CoveragePeriod","Q_PaymentPeriod","Q_Thumbnail","Q_CompositionProperty","Q_AccMinAge","Q_AccMaxAge","Q_AccSex","Q_AccOccupation","Q_Description","Q_ListOrder","Q_RateTable","Q_PlanCode","Q_AttachPlanCode","Q_RelyPlanCode","Q_RecordTime","Q_RecordNo","Q_RecordIRC","Q_RecordCategory","Q_IsInsrPrpslSysPrdct","N_CPCalculateMode","N_CUnitValue","N_CUnit","N_CMultipleMin","N_CMultipleMax","N_CMultipleStep","N_PUnit","N_DecimalDigits","N_CoveragePeriod","N_PaymentPeriod","N_PISex","N_PIOccupationCategory","N_PIAge","N_RateTable","N_DefaultCoverage","N_GetRateMethod","N_SexSet","N_AgeSet","N_Coverage","N_Premium","N_CurrencyUnit","N_CKeyboardAllowed","N_CUpperLimitedAuto","N_CLowerLimitedAuto","N_CumulationPremium","N_PremiumPerYear","N_AreaBnftList","N_AreaBenefit7","N_AreaBenefit7","N_PolicyTermURL","N_CatloguePictureURL","N_ChapterURL","N_PolicyTermQRURL","N_EliminationPeriod","N_CoveragePeriod","_CPCalculateMode","N_Premium","N_Coverage","N_Bnftlist","N_Featurelist","V_(Model_CumulationPremium,Model_Bnft_Disease_Death,Model_Bnft_Accidental_Death)"],"key":["Model_ProductID","Model_CName","Model_CShortName","Model_BrandID","Model_ProductCategoryID","Model_InsurerProposalSysID","Model_ContractProperty","Model_HasDividents","Model_CoveragePeriod0","Model_PaymentPeriod0","Model_Thumbnail","Model_CompositionProperty","Model_AccMinAge","Model_AccMaxAge","Model_AccSex","Model_AccOccupation","Model_Description","Model_ListOrder","Model_RateTableB","Model_PlanCode","Model_AttachPlanCode","Model_RelyPlanCode","Model_RecordTime","Model_RecordNo","Model_RecordIRC","Model_RecordCategory","Model_IsInsrPrpslSysPrdct","Model_CPCalculateMode","Model_CUnitValue","Model_CUnit","Model_CMultipleMin","Model_CMultipleMax","Model_CMultipleStep","Model_PUnit","Model_DecimalDigits","Model_CoveragePeriod","Model_PaymentPeriod","Model_PISex","Model_PIOccupationCategory","Model_PIAge","Model_RateTable","Model_DefaultCoverage","Model_GetRateMethod","Model_SexSet","Model_AgeSet","Model_Coverage","Model_Premium","Model_CurrencyUnit","Model_CKeyboardAllowed","Model_CUpperLimitedAuto","Model_CLowerLimitedAuto","Model_CumulationPremium","Model_PremiumPerYear","Model_AreaBnftList","Model_Bnft_Disease_Death","Model_Bnft_Accidental_Death","Model_PolicyTermURL","Model_CatloguePictureURL","Model_ChapterURL","Model_PolicyTermQRURL","Model_EliminationPeriod","NCIModel_InsuYear","NCIModel_Payendyear","NCIModel_Premium","NCIModel_Coverage","Model_Bnftlist","Model_Featurelist","Model_TrueBnft"]},"cName":"御享人生重大疾病保险","ProductID":5555}
             * featureData : [{"fieldName":"CoveragePeriod","value":-105,"displayName":"保至终身"},{"fieldName":"PaymentPeriod","value":30,"displayName":"30年交"},{"fieldName":"Premium","value":"2100","displayName":""},{"fieldName":"Coverage","value":"300000","displayName":""}]
             */

            private int brandId;
            private int isMain;
            private int sort;
            private String thumbnail;
            private int productId;
            private String productName;
            private SearchDataBean searchData;
            private List<?> benefit;
            private List<InsuranceOption> featureData;
            private ExtendJsonBean extendJson;

            public int getBrandId() {
                return brandId;
            }

            public void setBrandId(int brandId) {
                this.brandId = brandId;
            }

            public int getIsMain() {
                return isMain;
            }

            public void setIsMain(int isMain) {
                this.isMain = isMain;
            }

            public int getSort() {
                return sort;
            }

            public void setSort(int sort) {
                this.sort = sort;
            }

            public String getThumbnail() {
                return thumbnail;
            }

            public void setThumbnail(String thumbnail) {
                this.thumbnail = thumbnail;
            }

            public int getProductId() {
                return productId;
            }

            public void setProductId(int productId) {
                this.productId = productId;
            }

            public String getProductName() {
                return productName;
            }

            public void setProductName(String productName) {
                this.productName = productName;
            }

            public SearchDataBean getSearchData() {
                return searchData;
            }

            public void setSearchData(SearchDataBean searchData) {
                this.searchData = searchData;
            }

            public List<?> getBenefit() {
                return benefit;
            }

            public void setBenefit(List<?> benefit) {
                this.benefit = benefit;
            }

            public List<InsuranceOption> getFeatureData() {
                return featureData;
            }

            public void setFeatureData(List<InsuranceOption> featureData) {
                this.featureData = featureData;
            }

            public ExtendJsonBean getExtendJson() {
                return extendJson;
            }

            public void setExtendJson(ExtendJsonBean extendJson) {
                this.extendJson = extendJson;
            }

            public static class SearchDataBean {
                /**
                 * CShortName : 御享人生
                 * modelMap : {"value":["Q_ProductID","Q_CName","Q_CShortName","Q_BrandID","Q_ProductCategoryID","Q_InsurerProposalSysID","Q_ContractProperty","Q_HasDividents","Q_CoveragePeriod","Q_PaymentPeriod","Q_Thumbnail","Q_CompositionProperty","Q_AccMinAge","Q_AccMaxAge","Q_AccSex","Q_AccOccupation","Q_Description","Q_ListOrder","Q_RateTable","Q_PlanCode","Q_AttachPlanCode","Q_RelyPlanCode","Q_RecordTime","Q_RecordNo","Q_RecordIRC","Q_RecordCategory","Q_IsInsrPrpslSysPrdct","N_CPCalculateMode","N_CUnitValue","N_CUnit","N_CMultipleMin","N_CMultipleMax","N_CMultipleStep","N_PUnit","N_DecimalDigits","N_CoveragePeriod","N_PaymentPeriod","N_PISex","N_PIOccupationCategory","N_PIAge","N_RateTable","N_DefaultCoverage","N_GetRateMethod","N_SexSet","N_AgeSet","N_Coverage","N_Premium","N_CurrencyUnit","N_CKeyboardAllowed","N_CUpperLimitedAuto","N_CLowerLimitedAuto","N_CumulationPremium","N_PremiumPerYear","N_AreaBnftList","N_AreaBenefit7","N_AreaBenefit7","N_PolicyTermURL","N_CatloguePictureURL","N_ChapterURL","N_PolicyTermQRURL","N_EliminationPeriod","N_CoveragePeriod","_CPCalculateMode","N_Premium","N_Coverage","N_Bnftlist","N_Featurelist","V_(Model_CumulationPremium,Model_Bnft_Disease_Death,Model_Bnft_Accidental_Death)"],"key":["Model_ProductID","Model_CName","Model_CShortName","Model_BrandID","Model_ProductCategoryID","Model_InsurerProposalSysID","Model_ContractProperty","Model_HasDividents","Model_CoveragePeriod0","Model_PaymentPeriod0","Model_Thumbnail","Model_CompositionProperty","Model_AccMinAge","Model_AccMaxAge","Model_AccSex","Model_AccOccupation","Model_Description","Model_ListOrder","Model_RateTableB","Model_PlanCode","Model_AttachPlanCode","Model_RelyPlanCode","Model_RecordTime","Model_RecordNo","Model_RecordIRC","Model_RecordCategory","Model_IsInsrPrpslSysPrdct","Model_CPCalculateMode","Model_CUnitValue","Model_CUnit","Model_CMultipleMin","Model_CMultipleMax","Model_CMultipleStep","Model_PUnit","Model_DecimalDigits","Model_CoveragePeriod","Model_PaymentPeriod","Model_PISex","Model_PIOccupationCategory","Model_PIAge","Model_RateTable","Model_DefaultCoverage","Model_GetRateMethod","Model_SexSet","Model_AgeSet","Model_Coverage","Model_Premium","Model_CurrencyUnit","Model_CKeyboardAllowed","Model_CUpperLimitedAuto","Model_CLowerLimitedAuto","Model_CumulationPremium","Model_PremiumPerYear","Model_AreaBnftList","Model_Bnft_Disease_Death","Model_Bnft_Accidental_Death","Model_PolicyTermURL","Model_CatloguePictureURL","Model_ChapterURL","Model_PolicyTermQRURL","Model_EliminationPeriod","NCIModel_InsuYear","NCIModel_Payendyear","NCIModel_Premium","NCIModel_Coverage","Model_Bnftlist","Model_Featurelist","Model_TrueBnft"]}
                 * cName : 御享人生重大疾病保险
                 * ProductID : 5555
                 */

                private String CShortName;
                private ModelMapBean modelMap;
                private String cName;
                private int ProductID;

                public String getCShortName() {
                    return CShortName;
                }

                public void setCShortName(String CShortName) {
                    this.CShortName = CShortName;
                }

                public ModelMapBean getModelMap() {
                    return modelMap;
                }

                public void setModelMap(ModelMapBean modelMap) {
                    this.modelMap = modelMap;
                }

                public String getCName() {
                    return cName;
                }

                public void setCName(String cName) {
                    this.cName = cName;
                }

                public int getProductID() {
                    return ProductID;
                }

                public void setProductID(int ProductID) {
                    this.ProductID = ProductID;
                }

                public static class ModelMapBean {
                    private List<String> value;
                    private List<String> key;

                    public List<String> getValue() {
                        return value;
                    }

                    public void setValue(List<String> value) {
                        this.value = value;
                    }

                    public List<String> getKey() {
                        return key;
                    }

                    public void setKey(List<String> key) {
                        this.key = key;
                    }
                }
            }

            public static class FeatureDataBean {
                /**
                 * fieldName : CoveragePeriod
                 * value : -105
                 * displayName : 保至终身
                 */

                private String fieldName;
                private int value;
                private String displayName;

                public String getFieldName() {
                    return fieldName;
                }

                public void setFieldName(String fieldName) {
                    this.fieldName = fieldName;
                }

                public int getValue() {
                    return value;
                }

                public void setValue(int value) {
                    this.value = value;
                }

                public String getDisplayName() {
                    return displayName;
                }

                public void setDisplayName(String displayName) {
                    this.displayName = displayName;
                }
            }

            public static class ExtendJsonBean {
                private String planCode;
                private int riskType;
                private String exemptPerson;
                private List<String> exemptProduct;
                private BusinessConfig businessConfig;
                private int shouldSaveClient;

                private String accMaxAge;
                private String accMinAge;
                private String accOccupation;
                private String accSex;

                public int getShouldSaveClient() {
                    return shouldSaveClient;
                }

                public void setShouldSaveClient(int shouldSaveClient) {
                    this.shouldSaveClient = shouldSaveClient;
                }

                public String getAccMaxAge() {
                    return accMaxAge;
                }

                public void setAccMaxAge(String accMaxAge) {
                    this.accMaxAge = accMaxAge;
                }

                public String getAccMinAge() {
                    return accMinAge;
                }

                public void setAccMinAge(String accMinAge) {
                    this.accMinAge = accMinAge;
                }

                public String getAccOccupation() {
                    return accOccupation;
                }

                public void setAccOccupation(String accOccupation) {
                    this.accOccupation = accOccupation;
                }

                public String getAccSex() {
                    return accSex;
                }

                public void setAccSex(String accSex) {
                    this.accSex = accSex;
                }

                public BusinessConfig getBusinessConfig() {
                    return businessConfig;
                }

                public void setBusinessConfig(BusinessConfig businessConfig) {
                    this.businessConfig = businessConfig;
                }

                public String getPlanCode() {
                    return planCode;
                }

                public void setPlanCode(String planCode) {
                    this.planCode = planCode;
                }

                public int getRiskType() {
                    return riskType;
                }

                public void setRiskType(int riskType) {
                    this.riskType = riskType;
                }

                public String getExemptPerson() {
                    return exemptPerson;
                }

                public void setExemptPerson(String exemptPerson) {
                    this.exemptPerson = exemptPerson;
                }

                public List<String> getExemptProduct() {
                    return exemptProduct;
                }

                public void setExemptProduct(List<String> exemptProduct) {
                    this.exemptProduct = exemptProduct;
                }
            }
        }
    }

    /**
     * 投保人
     *
     * @return
     */
    public ApplicantEntity getProposalApplicant() {
        if (applicant == null) {
            return null;
        }
        ApplicantEntity mApplicant = new ApplicantEntity();
        mApplicant.clientAccountId = applicant.getClientAccountId();
        mApplicant.name = applicant.getName();
        mApplicant.sex = applicant.getSex();
        mApplicant.age = applicant.getAge();
        mApplicant.birthday = applicant.getBirthday();
        return mApplicant;
    }

    /**
     * 被保人<单被保人版本>
     *
     * @return
     */
    public InsuredEntity getProposalFirstInsured() {
        if (insured == null || insured.size() == 0) {
            return null;
        }
        InsuredBean insuredBean = insured.get(0);
        if (insuredBean == null) {
            return null;
        }
        InsuredEntity mInsured = new InsuredEntity();
        mInsured.clientAccountId = "";
        mInsured.name = insuredBean.getName();
        mInsured.sex = insuredBean.getSex();
        mInsured.age = insuredBean.getAge();
        mInsured.birthday = insuredBean.getBirthday();
        mInsured.profession = Integer.valueOf(insuredBean.getProfession());
        mInsured.relation = Integer.valueOf(insuredBean.getRelation());
        return mInsured;
    }


    /**
     * 被保人<单被保人版本>
     *
     * @return
     */
    public List<InsuredEntity> getProposalAllInsured() {
        if (insured == null || insured.size() == 0) {
            return null;
        }
        List<InsuredEntity> list = new ArrayList<>();
        for (InsuredBean item : insured) {
            if (item != null) {
                list.add(convertInsuredBeanToInsuredEntity(item));
            }
        }
        return list;
    }

    private InsuredEntity convertInsuredBeanToInsuredEntity(InsuredBean insuredBean){
        InsuredEntity ret = new InsuredEntity();
        ret.clientAccountId = "";
        ret.name = insuredBean.getName();
        ret.sex = insuredBean.getSex();
        ret.age = insuredBean.getAge();
        ret.birthday = insuredBean.getBirthday();
        ret.profession = Integer.valueOf(insuredBean.getProfession());
        ret.relation = Integer.valueOf(insuredBean.getRelation());
        List<InsuredBean.RiskBean> riskBeans = insuredBean.getRisk();
        List<InsuranceEntity> risk = new ArrayList<>();
        for (InsuredBean.RiskBean item : riskBeans){
            risk.add(convertRiskBeanToInsuranceEntity(item));
        }
        ret.risk = risk;
        return ret;
    }

    private InsuranceEntity convertRiskBeanToInsuranceEntity(InsuredBean.RiskBean riskBean) {
        InsuranceEntity insuranceEntity = new InsuranceEntity();
        insuranceEntity.productId = riskBean.getProductId();
        insuranceEntity.productName = riskBean.getProductName();
        insuranceEntity.thumbnail = riskBean.getThumbnail();
        insuranceEntity.isMain = riskBean.getIsMain();
        if (riskBean.getIsMain() == 2) {
            insuranceEntity.isBindingMain = true;
        }
        insuranceEntity.sort = riskBean.getSort();
        insuranceEntity.featureData = riskBean.getFeatureData();
        /* 将险种参数从featureData中解析到对应的InsuranceOption中*/
        insuranceEntity.parseFeatureData();
        /* 加载豁免险相关*/
        InsuredBean.RiskBean.ExtendJsonBean extendJson = riskBean.getExtendJson();
        if (extendJson != null) {
            insuranceEntity.planCode = extendJson.planCode;
            insuranceEntity.riskType = extendJson.riskType;
            insuranceEntity.exemptPerson = extendJson.exemptPerson;
            insuranceEntity.exemptProduct = extendJson.exemptProduct;
            insuranceEntity.businessConfig = extendJson.businessConfig;
        }
        return insuranceEntity;
    }

    /**
     * 险种<单被保人版本>
     *
     * @return
     */
    public List<InsuranceEntity> getProposalRisks() {
        if (insured == null || insured.size() == 0) {
            return null;
        }
        InsuredBean insuredBean = insured.get(0);
        if (insuredBean == null) {
            return null;
        }
        List<InsuredBean.RiskBean> risks = insuredBean.getRisk();
        if (risks == null || risks.size() == 0) {
            return null;
        }
        List<InsuranceEntity> mInsurances = new ArrayList<>();
        for (InsuredBean.RiskBean riskBean : risks) {
            if (riskBean != null) {
                InsuranceEntity insurance = new InsuranceEntity();
                insurance.productId = riskBean.getProductId();
                insurance.productName = riskBean.getProductName();
                insurance.thumbnail = riskBean.getThumbnail();
                insurance.isMain = riskBean.getIsMain();
                insurance.brandId = brandId;

                if (riskBean.getIsMain() == 2) {
                    insurance.isBindingMain = true;
                }
                insurance.sort = riskBean.getSort();
                insurance.featureData = riskBean.getFeatureData();
                /* 将险种参数从featureData中解析到对应的InsuranceOption中*/
                insurance.parseFeatureData();
                /* 加载豁免险相关*/
                InsuredBean.RiskBean.ExtendJsonBean extendJson = riskBean.getExtendJson();
                if (extendJson != null) {
                    insurance.planCode = extendJson.planCode;
                    insurance.riskType = extendJson.riskType;
                    insurance.exemptPerson = extendJson.exemptPerson;
                    insurance.exemptProduct = extendJson.exemptProduct;
                    insurance.businessConfig = extendJson.businessConfig;
                    insurance.shouldSaveClient = extendJson.shouldSaveClient;
                    insurance.accSex = extendJson.getAccSex();
                    insurance.accMaxAge = extendJson.getAccMaxAge();
                    insurance.accMinAge = extendJson.getAccMinAge();
                    insurance.accOccupation = extendJson.getAccOccupation();
                }
                mInsurances.add(insurance);
            }
        }
        return mInsurances;
    }

}
